package com.sf.fy.uav.applet.operate.controller;

import com.sf.fy.uav.applet.operate.service.AddressService;
import com.sf.fy.uav.common.utils.Rs;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author LTQ
 */
@RestController
@RequestMapping("/sys/address/")
public class AddressController {

    @Autowired
    private AddressService addressService;

    @GetMapping("split-address")
    @Operation(tags = "地址拆分", description = "地址拆分")
    public Rs<Object> splitAddress(@RequestParam String originalAddress) {
        return Rs.success(addressService.splitAddress(originalAddress));
    }

}
